package com.qf.config;

import org.omg.CORBA.PUBLIC_MEMBER;
import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyConfig {

    @Bean
    public Queue queue(){
        return new Queue("SADSADSAAAA");
    }

    @Bean
    public TopicExchange topicExchange(){
        return new TopicExchange("qwe");
    }

//    绑定 队列到交换机
    @Bean
    public Binding binding(Queue queue,TopicExchange topicExchange){
        return BindingBuilder.bind(queue).to(topicExchange).with("*.dsg");
    }

/*    @Bean
    public Queue suibian() {
        return new Queue("bk01");
    }

    @Bean
    public TopicExchange topicExchange() {
        return new TopicExchange("meiyouduiliedejiaohuanji");
    }
    @Bean
    public Binding bindingQueue2TopicExchange(Queue queue,TopicExchange topicExchange) {
        return BindingBuilder.bind(queue).to(topicExchange).with("*.dsg");
    }*/
}
